namespace Dida
{
	[Dxml.DidaObject]
	public class ComponentVector2D : IAniValue<Vector2D>
	{
		public AniSocket<float> x;
		public AniSocket<float> y;

		Vector2D value;

		[Dxml.AutoXmlConstructor]
		public ComponentVector2D(AniSocket<float> x, AniSocket<float> y)
		{
			this.x = x;
			this.y = y;
		}

		public Vector2D CurrentValue
		{
			get { return value; }
		}

		public void Start()
		{
			Update(0);
		}

		public void Update(float timeDelta)
		{
			value.x = x.Value;
			value.y = y.Value;
		}
	}

	[Dxml.DidaObject]
	public class ComponentVector3D : IAniValue<Vector3D>
	{
		public AniSocket<float> x;
		public AniSocket<float> y;
		public AniSocket<float> z;

		Vector3D value;

		[Dxml.AutoXmlConstructor]
		public ComponentVector3D(AniSocket<float> x, AniSocket<float> y, AniSocket<float> z)
		{
			this.x = x;
			this.y = y;
			this.z = z;
		}

		public Vector3D CurrentValue
		{
			get { return value; }
		}

		public void Start()
		{
			Update(0);
		}

		public void Update(float timeDelta)
		{
			value.x = x.Value;
			value.y = y.Value;
			value.z = z.Value;
		}
	}
}